home *** CD-ROM | disk | FTP | other *** search
- From: RMokady@acorn.co.uk (Ran Mokady)
- Date: 17 Nov 92 11:17:52 GMT
-
-
- The Free module provides two SWIs which enable any filing system to provide
- a RISC OS 3 style free space display:
-
-
- Free_Register (&444c0)
- In:
- R0 = filing system number.
- R1 = address of routine to call to get free space information
- R2 = R12 value on entry to above routine
- Out:
- Registers preserved.
-
- The routine pointed to by R1 will be called in USR mode, with the return
- address already pushed on the stack.
-
- Since the routine is executed in USR mode, you should not use the
- provided stack, if you need any stack space, you will need to allocate it
- yourself. (It is safe to assume that the stack will be deep enough to hold
- the entry registers).
-
- The routine will be called with the following reason codes in R0:
-
-
- NoOp (0)
-
- In:
- R0 =0
- Out:
- -
-
- This should just return to the caller.
-
- GetDeviceName (1)
-
- In:
- R0 = 1
- R1 = filing system number
- R2 = pointer to buffer
- R3 = pointer to device name / id.
-
- Out:
- R0 = length of name
- [R2] name to use in window.
-
- This reason code is used to find the name to use in the window. For example
- it is used on ADFS drives to convert the drive number to the disc name.
-
-
- GetFreeSpace (2)
-
- In:
- R0 = 2
- R1 = filing system number
- R2 = pointer to 3 word buffer
- R3 = pointer to device name / id.
-
- Out:
-
- R0-R3 preserved.
-
- [R2] Total size of device (0 if unchanged from last call)
- [R2+4] Free space on device
- [R2+8] Used space on device
-
-
- CompareDevice
-
- In:
- R0 = 3
- R1 = filing system number
- R2 = pointer to file name
- R3 = pointer to device name / id
- R6 = pointer to special field
-
- Out:
-
- R0-R3,R6 preserved.
- Z set if R2 & R6 result in a file on the device pointed to by R3.
-
-
- This call can simply return with Z set if the filing system (e.g.
- RAMFS) is a fast one (i.e. if the time to process reason call 2 is less than
- that required to process this call).
-
-
- ------------------------------------------------------------------------------
-
- Free_DeRegister (&444c1)
-
- In:
- R0 = filing system number
- R1 = address of routine
- R2 = R12 value on entry to above routine
-
- Out:
- Registers preserved.
-
- This is used to remove the support after it has been registered with
- Free_Register.
-
-
- Hope this helps,
-
- Ran.
-
- -----
- RMokady@acorn.co.uk |
- Ran Mokady | "We're children, Needing other children
- Senior Software Engineer | And yet letting our grown up pride
- Technical Support | Hide all the need inside
- Acorn Computers | Acting more like children than children"
- Cambridge, UK. |
-
-
- From: /G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/@mhs-relay.ac.uk
- Date: 18 Nov 92 16:31:18 GMT
- Organization: Yale CS Mail/News Gateway
-
- OS_FSControl 49 - reads free space on the disc or image file that holds a
- specified object.
-
- Entry: r0 = 49
- r1 = pinter to name of object (null terminated)
- Exit: r0 = free space
- r1 = largest creatable object
- r2 = disc size
-
- If you pass adfs::4.$.PC.Drive_C.DRDOS.TMP in r1, the information returned
- in r0-r2 will be for the PC hard disk image Drive_C and not ADFS drive 4.
-
- You can intercept the *Free call made by IDEFSFiler with:
-
- *SetMacro Alias$Free If "<Wimp$State>"="desktop" then ShowFree -FS
- <FileSwitch$TemporaryFilingSystem> %0 else %Free %0
-
- This should be enough for you to bolt interactive free space display on top
- of any RISC OS 2 filing system you may have, unless IDEFSFiler does a *%Free
- rather than *Free in which case you'd have to sit on OS_CLI in some way :-(.
-
- Owen.
-